import 'package:car_map/page/res/styles.dart';
import 'package:car_map/widget/load_image.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

///名医推荐
class WidgetDoctor extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Container(
      height: ScreenUtil().setHeight(220.0),
      child: ListView.builder(
        itemBuilder: (context, index) {
          return item();
        },
        itemCount: 8,
        shrinkWrap: true,
        scrollDirection: Axis.horizontal,
      ),
    );
  }

  Widget item() {
    return Container(
      width: ScreenUtil().setWidth(200),
      height: ScreenUtil().setHeight(220),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.center,
        mainAxisAlignment: MainAxisAlignment.spaceEvenly,
        children: <Widget>[
          ClipOval(
            child: LoadImage(
              'http://hbimg.b0.upaiyun.com/ebdd29d97dc42a38980767e445325b85a6c2a282250e-lvsrbR_fw236',
              width: ScreenUtil().setWidth(145.0),
              height: ScreenUtil().setHeight(120.0),
              fit: BoxFit.cover,
            ),
          ),
          Text(
            '李时珍',
            style: TextStyle(color: Colors.black87,fontSize: ScreenUtil().setSp(28.0)),
          ),
          Text(
            '精神科',
            style: TextStyle(color: Colors.black54,fontSize: ScreenUtil().setSp(24.0)),
          ),
        ],
      ),
    );
  }
}
